<?php
/**
 * Created by PhpStorm.
 * User: 15982
 * Date: 2017-08-11
 * Time: 10:12
 */

$host='localhost';
$user_name='root';
$password='helloworld';


$number=$_POST['number'];
$name=$_POST['name'];
$offer=$_POST['offer'];
$company=$_POST['company'];
$offerstate=$_POST['offerstate'];
$homeland=$_POST['homeland'];
$homestate=$_POST['homestate'];
$homefuture=$_POST['homefuture'];
$filefuture=$_POST['filefuture'];
//判断！！！
$conn=mysqli_connect('localhost','root','123456','zb');
if (!$conn) {
    die("连接失败:".mysqli_connect_error());
}

$sql="insert into class set 学号='".$number."',   姓名='".$name."',已签约单位='".$offer."',实习单位='".$company."',意向='".$offerstate."',生源地='".$homeland."',户口状态='".$homestate."',户口意向='".$homefuture."',档案意向='".$filefuture."',修改时间=NOW()";

    mysqli_query($conn,$sql) OR die("<br/>ERROR:<b>".mysqli_error()."</b><br/>SQL:".$sql);

    mysqli_close($conn);

    echo '数据插入成功！    <a href="login.php">返回</a>';


?>